package biz.ezcom.spring.ioc.test;

import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import biz.ezcom.spring.ioc.service.impl.UserServiceImpl;


public class ClientByType {
	public static ApplicationContext context = null;
	
	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
		context = new ClassPathXmlApplicationContext("applicationContext-byType.xml");
	}
	
	@Test
	public void test(){
		UserServiceImpl byType = (UserServiceImpl) context.getBean("byType");
		System.out.println(byType.getUserDao().getClass().getName());
	}
	
}
